<?php

	class Ajax{
		private $users;
	
		public function load(){
			$this->users = new Users();
		}
	
		public function readUsers(){
			$users = $this->users->readUsers();
			
			if($users !== false){
				echo '<tr>
					<th>' . lang('username') . '</th>
					<th>' . lang('password') . '</th>
					<th>' . lang('email') . '</th>
				</tr>';
			
				foreach($users as $user){
					echo '<tr>
					<td>' . $user['username'] . '</td>
					<td>' . $user['password'] . '</td>
					<td>' . $user['email'] . '</td>
					</tr>';
				}
			}
		}
	}

?>